Skip to content

Conversation

@gewarren
Copy link
Contributor

@gewarren gewarren commented Feb 5, 2026

Contributes to #41327 (fragments left in document).


Internal previews

📄 File 🔗 Preview link
docs/core/extensions/logging/custom-provider.md Implement a custom logging provider in .NET

@gewarren gewarren requested a review from a team as a code owner February 5, 2026 02:29
Copilot AI review requested due to automatic review settings February 5, 2026 02:29
@dotnetrepoman dotnetrepoman bot added this to the February 2026 milestone Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Issue #41327 by fixing code snippets and improving descriptions in the custom logging provider documentation. The main issue was that the documentation contained unexplained code fragments (specifically parameter lines from a method signature) that confused readers.

Changes:

  • Replaced the meaningless code snippet showing parameter fragments with a proper snippet reference that demonstrates the IsEnabled check pattern
  • Improved heading hierarchy by promoting subsections from H3 to H2 for better document structure
  • Enhanced clarity in various descriptions and converted text to be more conversational and aligned with Microsoft's documentation style guidelines

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
docs/core/extensions/snippets/configuration/console-custom-logging/ColorConsoleLogger.cs Added snippet markers around the IsEnabled check for better code reuse in documentation
docs/core/extensions/logging/custom-provider.md Fixed code snippet references, improved heading structure, enhanced descriptive text, added tables for better visual clarity, and updated metadata date
Comments suppressed due to low confidence (1)

docs/core/extensions/logging/custom-provider.md:58

  • The highlight now only emphasizes line 7 (ProviderAlias attribute), but the explanatory text on lines 57-58 describes both the UnsupportedOSPlatform attribute (line 6) and the ProviderAlias attribute (line 7). Consider highlighting both lines 6-7 to match the text, or adjust the text to focus primarily on the ProviderAlias attribute.
:::code language="csharp" source="../snippets/configuration/console-custom-logging/ColorConsoleLoggerProvider.cs" range="6-8" highlight="7":::

The `ColorConsoleLoggerProvider` class defines two class-scoped attributes:

- <xref:System.Runtime.Versioning.UnsupportedOSPlatformAttribute>: The `ColorConsoleLogger` type is _not supported_ in the `"browser"`.
- <xref:Microsoft.Extensions.Logging.ProviderAliasAttribute>: Configuration sections can define options using the `"ColorConsole"` key.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

docs/core/extensions/logging/custom-provider.md:85

  • According to markdown style guidelines, the title should be in sentence case. "app" should be lowercase rather than uppercase "App" to follow the guideline of capitalizing only the first word and proper nouns in headings and text.
- [Dependency injection in .NET](../dependency-injection/overview.md)

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @gewarren

Let's :shipit:

@gewarren gewarren enabled auto-merge (squash) February 5, 2026 16:18
@gewarren gewarren merged commit a8c8f3f into dotnet:main Feb 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants